#include "CEdit.h"

CEdit::CEdit() {
  m_hEdit = NULL;
}

void CEdit::SetHandle(HWND hEdit) {
  m_hEdit = hEdit;
}

HWND CEdit::GetHandle() {
  return m_hEdit;
}

HWND CEdit::Create(LPCTSTR lpszCaption, DWORD dwStyle, int x, int y, int w,
    int h, UINT nID, HWND hParent) {
  m_hEdit = ::CreateWindow("EDIT", lpszCaption, WS_CHILD | WS_VISIBLE |
      dwStyle, x, y, w, h, hParent, (HMENU)(long long)nID, NULL, NULL);
  return m_hEdit;
}

BOOL CEdit::Destroy() {
  return ::DestroyWindow(m_hEdit);
}

